﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace WebAPI_Demo.Controllers
{
    /// <summary>
    /// 过滤器控制器
    /// </summary>

    //控制器的路由：api/控制器名字(Category)/方法名
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class FilterController : ControllerBase
    {
        /// <summary>
        /// 产生bug，测试异常过滤器
        /// </summary>
        [HttpPost]
        public void showBug()
        {
            var a = 1;
            var b = 0;
            var c = a / b;
        }
    }
}
